<template>
  <el-input
    type="textarea"
    class="text-white"
    :style="{ width: '100%' }"
    :rows="16"
    readonly
    :value="logContent"
  ></el-input>
</template>

<script>
export default {
  name: 'VideoLog',
  data() {
    return {
      logs: ['正在连接....', '播放成功']
    }
  },
  computed: {
    logContent() {
      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
      return this.logs.reverse().join('\r\n')
    }
  },
  methods: {
    addLog(msg) {
      this.logs.push(msg)
    },
    clear() {
      this.logs = []
    }
  }
}
</script>

<style lang="scss" scoped>
@import '~@/assets/pages/index.scss';
</style>
